You are here: Trading System Programming > Reference > Classes > Balances > Balances Methods > getBuyingPower

getBuyingPower

The getBuyingPower method returns floating value representing current account's buying power.

Syntax

var getBuyingPower();

Return Value

This method returns current buying power floating value.

Example

The following example demonstrates the use of getBuyingPower() method.

 

function start()

{

//retrieve account'

var account = getAccount();

 

if(account.getBalances().getBuyingPower() < 1000.00)

return;

 

//we have more than $1000 of buying power, continue on...

}

 


Copyright © 2006-2009 ActiveTick LLC